Accessible Python Executable Builder

by Nathan Tech

A graphical tool for turning Python programs into distributable Windows applications with Nuitka or PyInstaller.

Requirements

The builder itself is supplied as a Windows executable. Python is still required for compiling your project. Select either a normal Python installation or a virtual environment containing the packages used by your program.

Depending on the selected build method, the chosen Python environment should contain:

The builder does not install Python packages automatically. Install required packages into the same Python environment selected in the program.

Getting started

  1. Run the supplied builder executable.
  2. Select Nuitka or PyInstaller.
  3. Choose the Python executable or select a virtual environment.
  4. Choose the main Python script for the application.
  5. Choose an output directory.
  6. Review the remaining settings and add any required packages, modules, or data files.
  7. Open Command and Output to review the generated command.
  8. Select Run Build.

Program tabs

General

Select the builder, Python environment, source script, output directory, output name, icon, build mode, console behaviour, and general build options.

Packages

Add complete Python packages that should be collected with the application. The package checker verifies packages against the currently selected Python environment.

Modules

Add individual imports that must be forced into the build, or exclude imports that should not be packaged.

Data Files

Add files and folders such as configuration files, templates, sounds, images, databases, and other resources required while the application is running.

Cython

Optionally compile selected .py or .pyx modules with Cython before packaging the application.

Command and Output

Review the command that will be executed, start or stop a build, and read the complete build log.

Recommended workflow

  1. Build the project once with only the basic General settings.
  2. Run the resulting application and note any missing imports or files.
  3. Add complete third-party packages on the Packages tab when appropriate.
  4. Add a specific import on the Modules tab only when automatic detection misses it.
  5. Add runtime resources on the Data Files tab.
  6. Use excluded modules only when a dependency is unnecessary or causes a build problem.
  7. Save the finished configuration so the build can be reproduced later.

Nuitka and PyInstaller

Builder Best suited to Notes
Nuitka Compiled applications, performance-sensitive projects, and stronger source-code transformation. May require a compatible C compiler and may take longer to build.
PyInstaller Fast packaging, broad compatibility, and projects that need a straightforward executable bundle. Usually faster to configure and build.

One file

Produces a single distributable executable. Startup can be slower because bundled files may need to be unpacked temporarily.

One directory

Produces an executable together with supporting files in one folder. This is often easier to diagnose and may start faster.

Console window

Disable the console window for graphical applications. Keep it enabled while diagnosing command-line programs or startup errors.

Packages and modules

Packages

Use the Packages tab for an entire package such as requests, numpy, or wx. This is useful when the package contains plugins, data files, or imports that are difficult for a builder to discover automatically.

Included modules

Use an included module for a specific dynamically imported module, such as package.submodule. Do not add every normal import manually; both builders already detect most imports.

Excluded modules

Exclude a module only when it is optional, unwanted, incompatible, or unnecessarily increases the size of the application. Excluding a required module will break the resulting program.

Data files

Data files are files used by the application that are not Python modules. Common examples include:

Each item has a source path and a destination inside the packaged application. Keep the destination relative rather than using an absolute drive path.

Cython pre-build

Cython support is optional. When enabled, selected Python or PYX modules are compiled before the normal Nuitka or PyInstaller step.

Use this for modules that benefit from compilation or for projects already designed to use Cython. It is not normally necessary for a basic executable build.

Cython must be installed in the selected Python environment, and a suitable compiler may also be required.

Configurations and BAT files

Save and load configuration

Configuration files store the selected paths, build options, packages, modules, data files, and Cython sources. Save a configuration after completing a successful build so it can be repeated or adjusted later.

Save BAT

The BAT option creates a Windows batch file containing the generated build commands. This can be used to repeat a build outside the graphical program.

Keep the BAT file with any related configuration or source project files. Paths recorded in the file may need updating if the project is moved.

Keyboard shortcuts

Shortcut Action
Alt + 1General tab
Alt + 2Packages tab
Alt + 3Modules tab
Alt + 4Data Files tab
Alt + 5Cython tab
Alt + 6Command and Output tab
Ctrl + RRun the build
Ctrl + SSave the generated BAT file
Ctrl + KStop the current build
DeleteRemove the selected item from supported lists

Languages

The program includes English, Turkish, French, Ukrainian, and Spanish. It normally follows the Windows language setting automatically.

The supplied locale folder must remain beside the executable:

Application Folder
├── AccessiblePythonExecutableBuilder.exe
├── README.html
└── locale
    ├── tr
    ├── fr
    ├── uk
    └── es

If the locale folder is missing or a translation cannot be loaded, the program uses English.

Troubleshooting

The builder is not installed

Install Nuitka or PyInstaller into the exact Python environment selected in the General tab. Installing it into a different Python installation will not make it available to the selected environment.

A package or module is reported as missing

Confirm that the correct Python executable or virtual environment is selected. Then install the missing dependency into that environment.

The build succeeds, but the program fails to start

  1. Temporarily enable the console window.
  2. Build in one-directory mode.
  3. Run the executable from a Command Prompt to view the error.
  4. Add any missing dynamic imports on the Modules tab.
  5. Add missing runtime resources on the Data Files tab.

The icon is not applied

Use a valid .ico file for Windows builds. Other image formats may not work consistently with every builder or Windows version.

The output filename is rejected

Enter only the application name, not a complete directory path. Choose the destination folder separately with the Output directory setting.

The application is unexpectedly large

Large scientific, graphical, or multimedia packages can add many dependencies. Review collected packages and data files, and exclude only modules that are known to be optional.

The executable is flagged by security software

Newly created or unsigned executables can occasionally trigger warnings. Build from trusted source code, scan the result, and consider code signing before distributing the application.